package com.spica.platform.feign.config;

import feign.Logger.Level;
import feign.Request;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * 全局配置
 */
@Configuration
public class GlobalFeignConfig {

	/**
	 * 日志处理
	 * @return
	 */
    @Bean
    public Level level() {
        return Level.FULL;
    }
    /**
     * 全局超时配置
     * @return
     */
    @Bean
    public Request.Options options(){
    	return new Request.Options(5000, TimeUnit.MILLISECONDS, 10000, TimeUnit.MILLISECONDS, true);
    }
}
